<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{

    protected $commands = [
        //
    ];

    protected function schedule(Schedule $schedule) {
        // 每分钟执行一次
        $schedule->command('cron:finish-crowdfunding')->everyMinute();
        // 每天凌晨执行一次
        $schedule->command('cron:calculate-installment-fine')->daily();
    }

    protected function commands() {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }

}
